package com.hsy.sunflowerbao.login.action

import com.hsy.sunflowerbao.base.http.BaseResponse
import com.hsy.sunflowerbao.login.data.ShopsData
import io.reactivex.Observable
import okhttp3.ResponseBody
import retrofit2.http.*

/**
 * 登录注册网路请求
 * Created on 2017/12/4.
 *
 * @author Yang
 */
interface LoginService {

    /**
     * 登录
     * @param params 参数
     */
    @FormUrlEncoded
    @POST("Auth/login.html")
    fun login(@FieldMap params: Map<String, String>): Observable<ResponseBody>

    /**
     * 获取店铺
     * @param params 参数
     */
    @GET("AppHome/shops.html")
    fun getShops(@QueryMap params: Map<String, String>): Observable<BaseResponse<List<ShopsData>>>

    /**
     * 选择店铺
     * @param params 参数
     */
    @FormUrlEncoded
    @POST("AppHome/selShop.html")
    fun selectShop(@FieldMap params: Map<String, String>): Observable<BaseResponse<ShopsData>>
}